package com.mojo.jedis.service;

import com.mojo.jedis.cache.UserCache;
import com.mojo.jedis.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author <a href="mailto:sjj@jianzhimao.com">mojo</a>
 * copyright (C), 2013-2021, 广州九尾信息科技有限公司
 * @date 2021/9/26 15:29
 */
@Service
public class UserService {
    @Autowired
    private UserCache userCache;

    public void redisString() {
        userCache.testRedis();
    }

    public User findById(Integer id) {
        return new User("Mojo", 23, LocalDateTime.now(), LocalDate.now());
    }

    public User add(User user) {
        return user;
    }
}
